# coding: utf8

""" rm/para/monitorAction!initData.do
?opeator=1
&redis.IP=192.168.15.44
&redis.Port=3306
&jboss.IP=192.168.15.55
&jboss.Port=80
&market.IP=192.168.15.66
&market.Port=66
&entrustIP=192.168.15.77
# """

import logging

from tools.httpUtil import HttpResponse


class server(object):

    def __init__(self):
        self.IP = str()
        self.Port = int()

    def __str__(self):
        return 'ip : %s, port : %d' % (self.IP, self.Port)

    # def __dict__(self):
    #     return {'IP':self.IP, 'Port':self.Port}


logger = logging.getLogger(__name__)
opeator = str()
entrustIP = str()

redis = server()
jboss = server()
market = server()



def initData():
    res = {
        'opeator' : opeator,
        'redis' : redis,
        'jboss' : jboss,
        'market' : market,
        'entrustIP' : entrustIP
    }

    return res

# TODO 当业务需要用到request内容的处理

if __name__ == '__main__':
    import types
    print  type(redis) is types.DictType
    print redis.__dict__